<?php
   

    //getting variables for this view
    $adminEdit = __get("admin") ;
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-US">
    <head>
        <?php osc_current_admin_theme_path('head.php') ; ?>
    </head>
    <body>
        <?php osc_current_admin_theme_path('header.php') ; ?>
        <div id="update_version" style="display:none;"></div>
        <div class="Header"><?php _e('Admins'); ?></div>
        <div id="content">
            <div id="separator"></div>
            <?php osc_current_admin_theme_path ( 'include/backoffice_menu.php' ) ; ?>

            <div id="right_column">
                <div id="content_header" class="content_header">
                    <div style="float: left;">
                        <img src="<?php echo  osc_current_admin_theme_url('images/admin-icon.png') ; ?>" title="" alt=""/>
                    </div>
                    <div id="content_header_arrow">&raquo;<?php _e('Edit admin'); ?></div>
                    <div style="clear: both;"></div>
                </div>
                <div id="content_separator"></div>
                <?php osc_show_flash_message('admin'); ?>
                <div id="settings_form" style="border: 1px solid #ccc; background: #eee; ">
                    <div style="padding: 20px;">				
                        <form action="<?php echo osc_admin_base_url(true);?>" method="post" onSubmit="return checkForm()">
                            <input type="hidden" name="action" value="edit_post" />
                            <input type="hidden" name="page" value="admins" />
                            <input type="hidden" name="id" value="<?php echo $adminEdit['pk_i_id']; ?>" />

                            <div style="float: left; width: 50%;">
                                <fieldset>
                                    <legend><?php _e('Real name'); ?> (<?php _e('required'); ?>)</legend>
                                    <input type="text" name="s_name" id="s_name" value="<?php echo htmlentities($adminEdit['s_name'],null, "UTF-8"); ?>" />
                                </fieldset>
                            </div>

                            <div style="float: left; width: 50%;">
                                <fieldset>
                                    <legend><?php _e('E-mail'); ?></legend>
                                    <input type="text" name="s_email" id="s_email" value="<?php echo htmlentities($adminEdit['s_email'],null, "UTF-8"); ?>" />
                                </fieldset>
                            </div>
                            <div style="clear: both;"></div>

                            <div style="float: left; width: 50%;">
                                <fieldset>
                                    <legend><?php _e('User name'); ?> (<?php _e('required'); ?>)</legend>
                                    <input type="text" name="s_username" id="s_username" value="<?php echo htmlentities($adminEdit['s_username'],null, "UTF-8"); ?>" />
                                </fieldset>
                            </div>

                            <div style="float: left; width: 50%;">
                                <fieldset>
                                    <legend><?php _e('Current password'); ?></legend>
                                    <input type="password" name="old_password" id="old_password" value="" />
                                    <legend><?php _e('New password'); ?></legend>
                                    <input type="password" name="s_password" id="s_password" value="" />
                                    <legend><?php _e('Re-type new password'); ?></legend>
                                    <input type="password" name="s_password2" id="password2" value="" />
                                </fieldset>
                                <div style="margin-left: 10px; width: 95%; padding: 4px; background: #FFD2CF;"><?php _e('Leave it blank if you don\'t want to change your password'); ?>.</div>
                            </div>
                            <div style="clear: both;"></div>
                            <input id="button_save" type="submit" value="<?php _e('Update'); ?>" />
                        </form>
                    </div>
                </div>
            </div>
        </div>
        <?php osc_current_admin_theme_path('footer.php') ; ?>
    </body>
</html>